The Carbon Printing Manager interface for applications is defined in the header file
PMApplication.h
. The original Printing Manager interface, defined in
Printing.h
, is not used by Carbon applications.
The following list summarizes the changes introduced by the Carbon Printing Manager:
TPrint
record is replaced by two opaque objects: a
PMPrintSettings
object and a
PMPageFormat
object. You create these objects using the
PMNewPrintSettings
and
PMNewPageFormat
functions, which return a reference that you can pass to other Carbon Printing Manager functions to obtain information stored in the objects.
PMPrintSettings
and
PMPageFormat
objects. Applications can attach extended data to both these objects using new Carbon Printing Manager functions, but applications must not assume a specific size when storing or retrieving a
PMPageFormat
object with documents.
PMPrintSettings
and
PMPageFormat
objects. In most cases, your application should store only the
PMPageFormat
object. If older versions of your application store a print record with a saved document, you may continue to do so to provide backward compatibility.
TPrPort
record is replaced by an opaque
PMPrintContext
object. You use the
PMGetGrafPtr
function to get the graphics port associated with the print context object.
PMBegin
/
PMEnd
block. In addition, the Carbon Printing Manager enforces an order in which some routines can be called. Any routine used out of order will return the
kPMOutOfScope
result code.
PMPrintSettings
and
PMPageFormat
objects are automatically disposed of by the
PMEnd
function. However, as a matter of good programming practice, it is recommended that your application explicitly dispose of these objects using the
PMDisposePrintSettings
and
PMDisposePageFormat
functions.
PMPageSetUPDialogInit
,
PMPrintDialogInit
,
PMPrintDialogMain
and
PMPageSetUpDialogMain
). These functions will be replaced by a new panel-based interface in future versions of Mac OS.
PrPicFile
function and the "deferred" printing style are no longer supported. All print records must use the "draft" style, and printer drivers must perform their own spooling or use the Desktop Printer Spooler. See Tech Note 1097 for information on using the Desktop Printer Spooler.
PrLoadDriver
are no longer supported. See New and Changed Printing Functions for a list of unsupported functions.